﻿using System.ComponentModel.DataAnnotations;
using System.Xml.Serialization;

namespace SelfService.HaiTai.Models.Appointment;

[XmlRoot("req")]
public class OrderPayRequest
{
    /// <summary>
    /// 医院ID
    /// Example: 100369001
    /// </summary>
    [XmlElement("hospitalId")]
    [Required(ErrorMessage = "医院ID不能为空")]
    public string HospitalId { get; set; }

    /// <summary>
    /// 支付订单号
    /// Example: a003692023042700802
    /// </summary>
    [XmlElement("orderId")]
    [Required(ErrorMessage = "订单号码不能为空")]
    public string OrderId { get; set; }

    /// <summary>
    /// 支付订单号
    /// Example: a003692023042700802
    /// </summary>
    [XmlElement("healthCardNo")]
    [Required(ErrorMessage = "卡号")]
    public string HealthCardNo { get; set; }

    /// <summary>
    /// 支付费用
    /// Example: 550
    /// </summary>
    [XmlElement("payAmout")]
    [Required(ErrorMessage = "支付费用不能为空")]
    public int PayAmount { get; set; }
    
    /// <summary>
    /// 支付时间
    /// Example: 2023-04-27 15:30:47
    /// </summary>
    [XmlElement("payTime")]
    [Required(ErrorMessage = "支付时间不能为空")]
    public string PayTime { get; set; }
    
    /// <summary>
    /// 支付方式
    /// </summary>
    [XmlElement("payMode")]
    [Required(ErrorMessage = "支付方式不能为空")]
    public string PayMode { get; set; }
    
    /// <summary>
    /// 交易流水号
    /// Example: 2023-04-27 15:30:47
    /// </summary>
    [XmlElement("tradeNo")]
    [Required(ErrorMessage = "交易流水号不能为空")]
    public string TradeNo { get; set; }
    
    /// <summary>
    /// 患者ID
    /// Example: 1568534
    /// </summary>
    [XmlElement("patientId")]
    [Required(ErrorMessage = "患者ID不能为空")]
    public string PatientId { get; set; }
    
    /// <summary>
    /// 号源ID
    /// </summary>
    [XmlElement("bookingNo")]
    [Required(ErrorMessage = "号源ID不能为空")]
    public string BookingNo { get; set; }
    
    /// <summary>
    /// 服务对象
    /// </summary>
    [XmlElement("svObjectId")]
    public string SvObjectId { get; set; }


    /// <summary>
    /// 操作员
    /// </summary>
    [XmlElement("operatorId")]
    public string OperatorId { get; set; }
}

public enum PayModeEnum
{
    微信 = 98,
    支付宝 = 99
}